package subraSoft.fenix.gui.administracion.authentication;

import subraSoft.centaurus.gui.option.amb.CenTableModel;
import subraSoft.fenix.model.authentication.cobj.FenPerfilCObj;


public class FenPerfilTableModel extends CenTableModel
{
	private static final long serialVersionUID = 1L;
	private static final String[] COLUMNAS = {"Id", "Descripcion"};
	
	public FenPerfilTableModel()
	{
		super();
	}
	
	public int getColumnCount() 
	{
		return COLUMNAS.length;
	}
	
	public Object getValueAt(int rowIndex, int columnIndex)
	{
		FenPerfilCObj cobj = (FenPerfilCObj) getDataProvider().get(rowIndex);
		
		switch (columnIndex) 
		{
			case 0:
				return cobj.getId();
			case 1:
				return cobj.getDescripcion();
			default:
				throw new RuntimeException("Error de Programacion 1");
		}
	}
	
	@Override
	public String getColumnName(int column) 
	{
		return COLUMNAS[column];
	}

}
